package org.xussen.dic;

import java.util.Comparator;

public class NodeComparable implements Comparator<Node> {
	
	public static NodeComparable instance = new NodeComparable();

	private NodeComparable() {}
	
	@Override
	public int compare(Node o1, Node o2) {
		Node node1 = o1;
		Node node2 = o2;
		if(node1.getC()>node2.getC()) {
			return 1;
		}
		if(node1.getC()<node2.getC()) {
			return -1;
		}
		if(node1.getC()==node2.getC()) {
			return 0;
		}
		return 0;
	}

}
